import { Req } from '../../shared/request/request'
import { prefix } from '../../shared/client/axios'

//请求获取用户列表
export async function reqGetUserList(req: Req, type: number, value: string,size = 2,page = 1): Promise<any> {
  const data = await req('get', `${prefix}/user/findUserList?type=${type}&value=${value}&pageSize=${size}&pageNumber=${page}`)
  return data
}

//请求获取所有角色
export async function reqGetAllRole(req: Req): Promise<any> {
  const data = await req('get', `${prefix}/role/getAll`)
  return data
}

//请求获取所有部门
export async function reqGetAllDepartment(req: Req): Promise<any> {
  const data = await req('get', `${prefix}/dep/getAllDep`)
  return data
}